package Arr;

public class maopao {
    public static void bubll(int[] arr){
        boolean flg =false;
        for (int i = 0; i < arr.length-1; i++) {
            for (int j = 0; j < arr.length-1-i; j++) {
                if (arr[i]>arr[i+1]){
                    int tmp=arr[i];
                    arr[i]=arr[i+1];
                    arr[i+1]=tmp;
                       flg=true;
                }


            }
            if (flg==false){
                break;
            }
        }
    }
}
